import request from '@/utils/request'
export function ftchDepartmentList() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

// 获取部门负责人列表

export function fetchManagerList() {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}

// 新增-部门
export function fetchAddDepart(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 删除部门
export function fetchDelDepart(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 获取部门详情
export function fetchDetail(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}

// 更新部门详情
export function fetchUpdateDepart(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data

  })
}
